package com.xiaoran.spring.service.Impl;

import com.xiaoran.spring.dao.StorageDao;
import com.xiaoran.spring.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;


import javax.annotation.Resource;

@Service
@Slf4j
public class StorageServiceImpl implements StorageService {

    @Resource
    private StorageDao storageDao;

    public void decrease(Long product_id, Integer count) {
        log.info("------->storage-service中扣减库存开始");
        storageDao.decrease(product_id,count);
        log.info("------->storage-service中扣减库存结束");
    }
}
